package com.csap.framework.oauth2.request;

import cn.dev33.satoken.oauth2.logic.type.ResponseType;
import com.csap.framework.annotation.apidoc.ApiModel;
import com.csap.framework.annotation.apidoc.ApiModelProperty;
import com.csap.framework.oauth2.BaseRequest;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotNull;

/**
 * Code授权码 相关参数
 *
 * @author yangchengfu
 * @dataTime 2021年-08月-03日 10:38:00
 **/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Accessors(chain = true)
@ApiModel("Code授权码参数")
public class AuthorizeRequest extends BaseRequest<AuthorizeRequest> {
    @ApiModelProperty(value = "返回类型", forceReq = true, required = true)
    @NotNull(message = "返回类型不能为空")
    private ResponseType response_type;
    @ApiModelProperty(value = "回调的URL", forceReq = true, required = true)
    private String redirect_uri;
    @ApiModelProperty(value = "状态", forceReq = true, required = true)
    private String state;
    @ApiModelProperty(value = "作用域", forceReq = true, required = true)
    private String scope;
}
